/* 
 * File:   Edge.cpp
 * Author: RaF
 * 
 * Created on 22 novembre 2012, 11.30
 */
 

#ifndef EDGE_H
#define	EDGE_H
template <typename V> class Vertex;

template <typename I> class Edge {
public:
    Edge(Vertex<I>* v, Vertex<I>* w, int weight);
    Edge(const Edge<I>& orig);
    virtual ~Edge();
    Vertex<I>* getFrom();
    Vertex<I>* getTo();
    int getWeight();
    
    //ridefinizione operatori
    bool operator<(Edge<I> &edge) { return weight<edge.getWeight(); }
    bool operator>(Edge<I> &edge) { return weight>edge.getWeight(); }
private:
    Vertex<I>* from, *to;
    int weight;
};

template <typename I> Edge<I>::Edge(Vertex<I>* v,Vertex<I>* w, int weight ):from(v),to(w),weight(weight) {
    
}

template <typename I> Edge<I>::Edge(const Edge<I>& orig) {
}

template <typename I> Edge<I>::~Edge() {
}
template <typename I> Vertex<I>* Edge<I>::getFrom(){
    return from;
}
    template <typename I> Vertex<I>* Edge<I>::getTo(){
        return to;
}
    template <typename I> int Edge<I>::getWeight(){
        return weight;
}
#endif